The present invention relates to data caching. More particularly, the present invention relates to apparatus for pre-computing streaming media data and to methods of operation of streaming data media caches.
Typical file caching methods include a cache receiving a file from a file server, and storing the entire file. Later, when a client desires the file, instead of serving the file from the file server, the file is served from the cache. Because the cache is typically a server that is closer to the client or has higher bandwidth than the file server, the file is served to the client quickly from the cache.
It has been discovered by the inventors, that attempting to apply typical file caching methods to files that include streaming media data, raises many new problems. For instance, serving a streaming media data file from a cache requires much more processing by the cache than with classical file transfers over the web. For example, during normal playback, the cache may need to perform a lot of processing such as packet modification, resequencing, and retiming. As another example, the cache may be called upon to perform random access within the streaming media data file as a result of a client xe2x80x9crewindxe2x80x9d or xe2x80x9cfast forwardxe2x80x9d operation. Because, classical caching is typically file-based, such a random access would involve moving within a very large data file.
Another drawback is that since streaming media data files are very large, a huge penalty is incurred if the streaming media data file is deleted. Typically if a file cache determines that it needs more disk space for new files, it will first delete older files, regardless of the size. As an example, if an older file is a streaming media data file that stores an hour-long program, the entire hour-long program is deleted even if the cache only needs to free up the equivalent of 1 minute of space.
Another drawback is that many different streaming media formats exist, each with its own specific streaming requirements. This is in contrast to classical file transfer over the web, where the files are essentially opaque to the cache and for streaming data to clients, the cache does not need to process the actual contents of the file beyond storage and retrieval.
Thus what is required are improved methods and apparatus for storing and serving streaming media within a cache. Further, what is required are methods and apparatus for providing such solutions in economical ways.
The present invention relates to streaming media caches and methods of operation. More particularly, the present invention relates to systems for pre-computation of streaming media payloads in a cache memory. Storing a streaming media clip in the efficient manner described below allows for flushing from a streaming media cache, portions of a streaming media clip that are not often requested, while maintaining portions of the streaming media clip that are often requested.
In the present disclosure xe2x80x9cStreaming mediaxe2x80x9d data generally refers to media intended to be transported at a select (often, subscribed) bit rate, and with a desired timeliness. The streaming media is adapted for playback in a desired order without regard to the order the streaming media data are received by a client system. Streaming media generally conforms to a real-time delivery protocol, such as, e.g., RTSP, RTP, or the like. The media (media clip) represented in the streaming media data may include static images, video data, audio data, executable files, presentation data, applet data, data files, and the like.
The data that is cached in a streaming media cache may be an entire streaming media clip, portions of a streaming media clip, or the like. In the case where there is a streaming media cache hit, the portion of the streaming media stored in the streaming media cache is served to a client. In the case of a streaming media cache miss, the missing portion of a streaming media clip may be retrieved from a media server, instead of an entire streaming media clip. The missing portion of the streaming media clip that is retrieved from an upstream or origin server is then stored and then served to a client. Storing a streaming media clip in the efficient method described below allows the streaming media cache to maintain portions of a streaming media clip that are often requested, and to flush portions of the streaming media clip that are not often requested.
According to one aspect of the invention, a method for storing streaming media data in a cache memory is disclosed. One technique includes receiving a data file from a streaming media server, determining a plurality of payload data packets from the data file to be streamed to a client system, and determining header data from the data file. Additional methods may include storing a portion of the header data in a session data object in the cache memory, and storing the plurality of payload data packets in a plurality of data objects in the cache memory, wherein each data object of the first plurality of data objects is directly addressable in the cache memory via an associated object handle, and wherein each data object of the first plurality of data objects stores a set of payload data packets.
According to another aspect of the invention, a cache memory including a processor configured to store streaming media data are disclosed. The cache memory may include code that directs the processor to receive a data file from a streaming media server, the data file including encoded media data, code that directs the processor to determine header data from the data file, and code that directs the processor to pre-compute a plurality of payload packets from the encoded media data. In one embodiment, the cache memory may also include a session data file storing a portion of the header data, wherein the header data are selected from the group: encoding scheme, duration, and a plurality of data objects storing the plurality of payload packets, wherein each data object of first plurality of data objects is directly addressable in the cache memory via an associated object handle, and wherein each data object of the plurality of data objects stores a set of payload packets from the plurality of payload packets.
According to another aspect of the invention, a computer program product for a computer system including a processor is described. Included in a tangible memory are executable code that directs the processor to receive a data file from a streaming media server, the data file including encoded media data, executable code that directs the processor to determine header data from the data file, and executable code that directs the processor to pre-compute a plurality of payload packets from the encoded media data. Additionally, executable code that directs the processor to store the header data in a session data object in the cache memory, and executable code that directs the processor to store the plurality of payload packets in a plurality of data objects in the cache memory, wherein each data object of the plurality of data objects is directly addressable by the processor in the cache memory via an associated object handle, and wherein each data object of the plurality of data objects stores a set of payload packets are included. The tangible memory may include a hard disk drive, a CD-ROM, removable media, and the like.